package cn.stylefeng.guns.modular.business.frequency.cmprovince.service;

import cn.stylefeng.guns.core.pojo.page.PageResult;
import cn.stylefeng.guns.core.pojo.response.ResponseData;
import cn.stylefeng.guns.modular.business.frequency.cmarea.entity.CmArea;
import cn.stylefeng.guns.modular.business.frequency.cmcity.entity.CmCity;
import cn.stylefeng.guns.modular.business.frequency.cmprovince.entity.CmProvince;
import cn.stylefeng.guns.modular.business.frequency.cmprovince.model.param.AdministrativeDivisionDTO;
import cn.stylefeng.guns.modular.business.frequency.cmprovince.model.param.CmProvinceParam;
import cn.stylefeng.guns.modular.business.frequency.cmprovince.model.result.PkgProvince;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
import com.tencentcloudapi.ecm.v20190719.models.Province;

import java.util.List;

/**
 * cm_province 服务类
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
public interface CmProvinceService extends IService<CmProvince> {

    /**
     * 分页查询cm_province
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    PageResult<CmProvince> page(CmProvinceParam cmProvinceParam);

    /**
     * 查询所有cm_province
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    List<CmProvince> list(CmProvinceParam cmProvinceParam);

    /**
     * 添加cm_province
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void add(CmProvinceParam cmProvinceParam);

    /**
     * 删除cm_province
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void delete(CmProvinceParam cmProvinceParam);

    /**
     * 编辑cm_province
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void edit(CmProvinceParam cmProvinceParam);

    /**
     * 查看详情cm_province
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    CmProvince detail(CmProvinceParam cmProvinceParam);

    ResponseData getCityListPage(AdministrativeDivisionDTO administrativeDivisionDTO);

    ResponseData getAllCityList();

    ResponseData getTreeAllCityList();

    ResponseData getAreaListByCityCode(String cityCode);

    ResponseData getNonCountyCityByProvinceCode(String provinceCode);

    boolean checkCityAdd(CmCity city, ResponseData responseData);

    void addCity(CmCity city);

    void deleteCity(String code);

    CmCity getCityByCode(String code);

    void updateCity(CmCity city);

    void addArea(CmArea area);

    void updateArea(CmArea area);

    CmArea getAreaByCode(String code);

    List getAllAreaList();

    List<CmProvince> getProvinceList();

    List<PkgProvince> getPkgProvinceCity();

    boolean checkAreaAdd(CmArea area, String message);

    boolean checkAreaUpdate(CmArea area, String errorMsg);

    void deleteArea(String code);
}